import java.util.HashMap;
import java.util.Map;

/**
 * Created by 14229 on 2020/2/19.
 */
public class Test03 {
    public static void main(String[] args) {
        int[] arr = {22,19,12,38,56,76,43,12,34,54,23,54,22,12,53};
        Map<Integer, Integer> map = test01(arr);
        System.out.println("最小值索引值为："+map.keySet()+"  值为："+map.values());
    }
    public static Map<Integer,Integer> test01(int[] arr){
        Map<Integer,Integer> map = new HashMap<>();
        int min = arr[0];
        for (int i = 0; i <arr.length ; i++) {
            if (min>arr[i]){
                min=arr[i];
            }
        }
        for (int i = 0; i <arr.length ; i++) {
            if (arr[i]==min){
                map.clear();
                map.put(i,min);
            }
        }
        return map;
    }
}
